{% assign plugins = site.plugins | default:site.gems %}

<div class="author mt4">
  {% assign author = include.author %}

  {% if author.picture %}
    {% include components/hy-img.html class="avatar" img=author.picture alt=author.name %}
  {% elsif plugins contains 'jekyll-avatar' %}
    {% assign avatar = author.social.github | default:author.github.username | default:author.github  %}
    {% include components/avatar-tag.html user=avatar %}
  {% endif %}

  {% assign heading_tag = include.heading_tag | default:'h2' %}
  {% assign heading_id = include.heading_id %}
  <{{ heading_tag }} {% if heading_id %}id="{{ heading_id }}"{% endif %} class="page-title hr">
    {{ include.heading | default:author.name }}
  </{{ heading_tag }}>

  {{ .author.about | markdownify }}

  <div class="sidebar-social">
    {% include components/social.html author=author %}
  </div>
</div>
